import Router from 'koa-router';
import servicesController from '@/controllers/services.controller';
import authMiddleware from '@/middlewares/auth.middleware';

const router = new Router({prefix: '/api/services'});

// 需要认证的路由
router.post('/create', authMiddleware, servicesController.createService);

// 获取服务列表
router.post('/list', authMiddleware, servicesController.getServiceList);

// 获取服务详情
router.get('/detail/:id', authMiddleware, servicesController.getServiceDetail);

// 删除服务
router.post('/delete/:id', authMiddleware, servicesController.deleteService);

// 修改服务信息
router.post('/update', authMiddleware, servicesController.updateService);

export default router; 